JBoss Community Archive (Read Only)

ModeShape 2.7

Aperture MIME type detector

The ApertureMimeTypeDetector class is an implementation of MimeTypeDetector that uses the Aperture open-source library, which is a very capable utility for determining the MIME type for a wide range of file types, using both the file name and the actual content.

To use, simply include the modeshape-mime-type-detector-aperture.jar file on the classpath and create a new ExecutionContext subcontext with it:

MimeTypeDetector myDetector = new ApertureMimeTypeDetector();
ExecutionContext contextWithMyDetector = context.with(myDetector);
JBoss.org Content Archive (Read Only), exported from JBoss Community Documentation Editor at 2020-03-11 12:03:08 UTC, last content change 2011-12-06 22:26:46 UTC.